﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class link : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    public string urlload()
    {
        string str = "";

        str += "<table ";
        str += " width: 126px;' border='1' cellpadding='0' cellspacing='0'>";
        str += " <tr>";
        str += "<td style='height: 1px'>";
        str += " </td>";
        str += " </tr>";


        //循环显示内容

        DataSet dsRule = new DataSet();
        dsRule.ReadXml(Getpath());

        DataTable dtRule = dsRule.Tables[0];
        foreach (DataRow dr in dtRule.Rows)
        {
            str += "<tr style='background-color: #DEDBDE'>";
            str += "  <td style='height: 25px' onmouseover=this.className='display' onmouseout=this.className='none'>";
            str += "<a href='" + dr["地址"].ToString() + "' target='_bland'><span style='padding-left: 3px'>" + dr["标题"].ToString() + "</span></a></td>";
            str += "</tr>";
        }
        str += "</table> ";

        return str;
    }
    string Getpath()
    {
        string xmlPath = "admin\\config\\config.xml";
        string s = Server.MapPath("~/");
        xmlPath = s + xmlPath;
        return xmlPath;
    }

}
